﻿<!DOCTYPE html>
<html lang="zh" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8"/>
    <title>山东营养源 - 信息列表页面</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta
            name="viewport"
            content="width=device-width, initial-scale=1, maximum-scale=1"
    />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
    <link rel="stylesheet" href="amis/antd.css"/>
    <link rel="stylesheet" href="amis/helper.css"/>
    <link rel="stylesheet" href="amis/iconfont.css"/>
    <style>
        html,
        body,
        .app-wrapper {
            position: relative;
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }
    </style>
</head>
<body>
<div id="root" class="app-wrapper"></div>
<script src="amis/sdk.js"></script>
<script type="text/javascript">
    (function () {
        let amis = amisRequire('amis/embed');
        // 通过替换下面这个配置来生成不同页面
        let amisJSON =
            {
                "type": "page",
                "title": "",
                "body": [
                    {
                        "type": "service",
                        "api": "/api/news/NewsList/${Id}",
                        "body": [
                            {
                                type: 'static',
                                className: 'text-center text-xl font-bold',
                                tpl: "信息分类：${NewClass.ClassName}"
                            },
                            {
                                "type": "table",
                                "title": "",
                                "source": "$rows",
                                "itemAction": {
                                    "type": "button",
                                    "actionType": "link",
                                    "link": "/Detail.html?Id=${Id}",
                                },
                                "columns": [
                                    {
                                        "name": "index",
                                        "label": "序号",
                                        width: '10%',
                                        type: "tpl",
                                        tpl: "${index+1}"
                                    },
                                    {
                                        "name": "Title",
                                        "label": "标题",
                                        style: {
                                            width: 'calc(100vw - 22vw)',
                                            overflow: 'hidden',
                                            whiteSpace: 'nowrap',
                                            textOverflow: 'ellipsis',
                                            display: 'block',
                                        },
                                        width: '90%',
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
        ;
        let amisScoped = amis.embed('#root', amisJSON, {}, {theme: 'antd'});
    })
    ();
</script>
</body>
</html>